Skip to content

feat(configurator): screenshot QA, mobile ergonomics, control UX - #403

Merged
jackgranatowski merged 2 commits into
mainfrom
claude/pr401-errors-reviews-np5mqg
Jun 25, 2026
Merged

feat(configurator): screenshot QA, mobile ergonomics, control UX#403
jackgranatowski merged 2 commits into
mainfrom
claude/pr401-errors-reviews-np5mqg

Conversation

@jackgranatowski

@jackgranatowski jackgranatowski commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Three production-readiness items for the Studio redesign landed in #402.

Changes

Item 6 — Screenshot QA

  • tests-e2e/screenshots.spec.js: 9 domains × 3 viewports (1280 / 768 / 390 px) — 27 PNGs via npx playwright test --project=screenshots
  • playwright.config.js: new screenshots project (isolated from the regression suite)

Item 7 — Mobile ergonomics

  • app.css: WCAG 2.5.5 touch targets — 44 px min-height for .cfg-btn / .cfg-input / .cfg-select at ≤980 px; .cfg-btn--sm bumped to 36 px
  • StudioFrame: description text hidden + h3 shrinks to clamp(18px,4vw,26px) at ≤820 px — left column no longer towers above controls on mobile
  • StudioWorkflow + LayoutStudio: horizontal-scroll fallback at ≤480 px so the 4-step workflow nav doesn't squash on narrow phones
  • ControlSection: starts collapsed on mobile (window.innerWidth < 768) to prevent 4000+ px page walls on domains with many sections

Item 8 — "What does this control do"

  • FriendlyControl: "drives N" badge using dependentsCount(); accent colour when ≥10 dependents (master token differentiation)
  • ControlPreview: short caption below every preview widget (colour / typeface / corner / elevation / timing / leading / text wrap / …)
  • SmartSettings: aggregate drives count shown in each section summary; reset button now shows the token count (Reset section (12))

Test plan

  • npm run build — clean build, no Svelte warnings
  • npm run test:unit — 525 unit tests pass
  • npx playwright test --project=screenshots — 27 PNGs captured, all 27 pass
  • Visual review of screenshots at 390 px — workflow nav scrolls, StudioFrame header compact, ControlSections collapsed
  • Spot-check a master token (e.g. --sf-space-scale) — "drives 45" badge visible in FriendlyControl

Generated by Claude Code

Summary by CodeRabbit

  • New Features
    • Added clearer labels and status badges in the configurator, including section-level and item-level usage indicators.
    • Improved the Studio workflow layout on smaller screens for easier horizontal navigation.
  • Bug Fixes
    • Updated responsive behavior so expandable sections and editor layouts behave more consistently across device sizes.
    • Improved touch target sizes for buttons, inputs, selects, and sliders on smaller viewports.
  • Tests
    • Added automated visual screenshot coverage for key Studio views at multiple screen widths.

@qodo-code-review

Copy link
Copy Markdown

Looking for bugs?

Check back in a few minutes. Qodo's review agents are on it.

Item 6 — Screenshot QA
- Add tests-e2e/screenshots.spec.js: 9 domains × 3 viewports (1280/768/390px)
- Add 'screenshots' project to playwright.config.js

Item 7 — Mobile ergonomics
- app.css: 44px touch targets for cfg-btn/cfg-input/cfg-select at ≤980px
- StudioFrame: hide description and shrink h3 at ≤820px
- StudioWorkflow + LayoutStudio: horizontal scroll at ≤480px
- ControlSection: default-closed on mobile (window.innerWidth < 768)

Item 8 — "What does this control do"
- FriendlyControl: "drives N" badge via dependentsCount(); ≥10 = master
- ControlPreview: caption label below each preview widget
- SmartSettings: drives count in section summary; token count in reset

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jackgranatowski
jackgranatowski force-pushed the claude/pr401-errors-reviews-np5mqg branch from 21cee20 to 5f21c5f Compare June 25, 2026 07:55
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jackgranatowski, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 50 minutes and 59 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 08626279-a621-4d88-9e14-2100b42b6aa9

📥 Commits

Reviewing files that changed from the base of the PR and between 5f21c5f and 5454930.

📒 Files selected for processing (2)
  • configurator/playwright.config.js
  • configurator/src/styles/app.css
📝 Walkthrough

Walkthrough

Adds a Chromium-only screenshot project and spec, updates control header metadata and captions, and changes responsive layouts plus touch-target sizing across the configurator.

Changes

Configurator UI updates

Layer / File(s) Summary
Dependency counts in control headers
configurator/src/components/FriendlyControl.svelte, configurator/src/components/SmartSettings.svelte
Derives dependency counts and renders drives badges plus token counts in the header UI.
Control preview caption
configurator/src/components/ControlPreview.svelte
Maps preview types to caption labels and renders the derived caption with new styling.
Responsive section state
configurator/src/components/ControlSection.svelte
Initializes details state from viewport width and keeps it synchronized with user toggles.
Responsive editor layouts and touch targets
configurator/src/components/editors/*, configurator/src/styles/app.css
Adds narrow-viewport grid changes, overflow handling, and touch-target sizing across the editor views and global controls.
Screenshot project and spec
configurator/playwright.config.js, configurator/tests-e2e/screenshots.spec.js
Adds a Chromium-only screenshots project and a new spec that captures domain and viewport screenshot fixtures.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

codex

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the three main change areas: screenshot QA, mobile ergonomics, and control UX.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/pr401-errors-reviews-np5mqg

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added the codex label Jun 25, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@configurator/playwright.config.js`:
- Line 37: The default chromium project is still matching screenshots.spec.js,
which causes the same tests to run twice alongside the dedicated screenshots
project. Update the Playwright config so the chromium project excludes
screenshots.spec.js while keeping the separate screenshots project in place;
adjust the project definition(s) in playwright.config.js around the chromium and
screenshots entries so screenshots only run under the screenshots project.

In `@configurator/src/components/ControlSection.svelte`:
- Line 3: The ControlSection initialization reads window.innerWidth directly in
the $state setup, which can crash during SSR. Update ControlSection.svelte so
the initial open state does not access window at module/render time, and move
the viewport-dependent logic into a client-only effect or equivalent guard that
checks typeof window before using innerWidth. Use the existing open state setup
in ControlSection and keep the defaultOpen behavior intact when the client is
available.

In `@configurator/src/styles/app.css`:
- Around line 275-279: The touch-target rules in app.css still allow smaller
controls because `.cfg-btn--sm` and `input[type='range']` override the new 44px
minimum. Update the responsive sizing rules so the relevant selectors
(`.cfg-btn`, `.cfg-btn--sm`, `.cfg-input`, `.cfg-select`, and
`input[type='range']`) all enforce at least 44px in the touch-target media
query, removing or adjusting the smaller overrides so the rule is consistent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a2829333-db87-41c0-ba92-c9c2b8d5c992

📥 Commits

Reviewing files that changed from the base of the PR and between cca55f8 and 5f21c5f.

📒 Files selected for processing (10)
  • configurator/playwright.config.js
  • configurator/src/components/ControlPreview.svelte
  • configurator/src/components/ControlSection.svelte
  • configurator/src/components/FriendlyControl.svelte
  • configurator/src/components/SmartSettings.svelte
  • configurator/src/components/editors/LayoutStudio.svelte
  • configurator/src/components/editors/StudioFrame.svelte
  • configurator/src/components/editors/StudioWorkflow.svelte
  • configurator/src/styles/app.css
  • configurator/tests-e2e/screenshots.spec.js

Comment thread configurator/playwright.config.js
Comment thread configurator/src/components/ControlSection.svelte
Comment thread configurator/src/styles/app.css Outdated
- playwright.config.js: exclude screenshots.spec.js from the default
  chromium project so it only runs under the dedicated screenshots
  project (prevents duplicate runs in CI)
- app.css: bump .cfg-btn--sm and input[type='range'] to 44px min-height
  in the touch-target media query so all interactive controls meet
  WCAG 2.5.5 consistently

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants